﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Core;
public class ClockManager :ManagerBase<ClockManager>
{
    public override void InitModules()
    {
        base.InitModules();
        Add<ItemSyncManager>(new ItemSyncManager());
    }
    private void FixedUpdate()
    {
        Get<IItemSyncManager>().LoadActiveItemField();
        Get<IItemSyncManager>().SyncItemInstance();
        Get<IItemSyncManager>().SyncField();
        Get<IItemSyncManager>().SyncJoint();
        Get<IItemSyncManager>().SyncItemInfo();

        Get<IItemSyncManager>().ItemFixedUpdateLogic();
        Get<IItemSyncManager>().ItemFixedUpdatePresentation();

        //   InputManager.Instance.CreateFuncUpdateInfo();
        /*if(InputManager.Instance.GetKey(KeyCode.A)==false){
        }
        if (InputManager.Instance.GetKey(KeyCode.S) == false)
        {
        }
        if (InputManager.Instance.GetKey(KeyCode.D) == false)
        {
        }
        if (InputManager.Instance.GetKey(KeyCode.F) == false)
        {

        }*/
        GameControl.GameManager.Get<GameControl.IItemFuncManager>().UpdateFunc();

    }
    private void Update()
    {
      //  MessageManager.Instance.Get<GameControl.ItemFuncEvent>().DispatchMessage(GameControl.ItemFuncEvent.ClearOnKeyInfo, this, null);
        if (GameCombine.CombineManager.Get<GameCombine.ICombineUIManager>().CanObjectMove==true)
        {
            InputManager.Instance.CreateFuncUpdateInfo();
        }
        else
        {
            InputManager.Instance.CreateFuncUpdateInfo(true);
        }

    }

}
